<template>
	<div class="order_sbe">
		<router-link :to="val.path" class="order_nav clearfix" v-for="val,index in order">
			<img :src="val.src" class="fl">
			<div class="order_name">
				{{val.name}}
			</div>
		</router-link>
		<div class="order_nav clearfix" v-if="this.$store.state.message=='登陆成功'?true:false" @click="clearLocal">
			<img src="../../../assets/imgs/order.png" class="fl">
			<div class="order_name">
				退出账号
			</div>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				order:[
					{'src':require('../../../assets/imgs/order.png'),'name':'我的订单','path':'/Order'},
					{'src':require('../../../assets/imgs/order_search.png'),'name':'订单查询','path':'/'},
					{'src':require('../../../assets/imgs/phone.png'),'name':'电话下单','path':'/'},
					{'src':require('../../../assets/imgs/kefu.png'),'name':'在线咨询','path':'/'},
					{'src':require('../../../assets/imgs/proposal.png'),'name':'投诉建议','path':'/'}
				],
			}
		},
		methods:{
			clearLocal(){
				localStorage.clear()
				this.$router.go(0)
			}
		},
	}
</script>

<style>
	.order_sbe{
		background: #fff;
	}
	.order_nav {
		overflow: hidden;
		width: 98%;
		padding: 10px 0;
		border-bottom: 1px solid #f2f2f2;
		line-height: 30px;
		padding-left: 2%;
		display: block;
		color: #666666;
	}

	.order_nav img {
		width: 20px;
		height: 20px;
		display: inline-block;
		margin-top: 5px;
		margin-right: 15px;
	}
	.order_nav .order_name{
		font-size: 14px;
	}
</style>
